# eric7.WebBrowser.Tools.WebIconProvider

Module containing a web site icon storage object.

### Global Attributes

_WebIconProvider

### Classes

WebIconProvider | Class implementing a web site icon storage.

### Functions

instance | Global function to get a reference to the web icon provider and create it, if it hasn't been yet.

## WebIconProvider

Class implementing a web site icon storage.

### Signals

changed()
  emitted to indicate a change of the icons database

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

WebIconProvider | Constructor
__urlToString | Private method to convert an URL to a string.
clear | Public method to clear the icons cache.
close | Public method to close the web icon provider.
iconDatabasePath | Public method o get the path for the web site icons store.
iconForUrl | Public method to get an icon for an URL.
load | Public method to load the web site icons.
save | Public method to save the web site icons.
saveIcon | Public method to save a web site icon.
setIconDatabasePath | Public method to set the path for the web site icons store.
showWebIconDialog | Public method to show a dialog to manage the Favicons.

### Static Methods

None

#### WebIconProvider (Constructor)

WebIconProvider(parent=None)

Constructor

parent (QObject)
  reference to the parent object

#### WebIconProvider.__urlToString

__urlToString(url)

Private method to convert an URL to a string.

url (QUrl)
  URL to be converted

Return:
  string representation of the URL

Return Type:
  str

#### WebIconProvider.clear

clear()

Public method to clear the icons cache.

#### WebIconProvider.close

close()

Public method to close the web icon provider.

#### WebIconProvider.iconDatabasePath

iconDatabasePath()

Public method o get the path for the web site icons store.

Return:
  path to store the icons file to

Return Type:
  str

#### WebIconProvider.iconForUrl

iconForUrl(url)

Public method to get an icon for an URL.

url (QUrl)
  URL to get icon for

Return:
  icon for the URL

Return Type:
  QIcon

#### WebIconProvider.load

load()

Public method to load the web site icons.

#### WebIconProvider.save

save()

Public method to save the web site icons.

#### WebIconProvider.saveIcon

saveIcon(view)

Public method to save a web site icon.

view (WebBrowserView)
  reference to the view object

#### WebIconProvider.setIconDatabasePath

setIconDatabasePath(path)

Public method to set the path for the web site icons store.

path (str)
  path to store the icons file to

#### WebIconProvider.showWebIconDialog

showWebIconDialog(parent=None)

Public method to show a dialog to manage the Favicons.

parent (QWidget)
  reference to the parent widget

Up

## instance

instance()

Global function to get a reference to the web icon provider and create it, if it hasn't been yet.

Return:
  reference to the web icon provider object

Return Type:
  WebIconProvider

Up